import {Router, Route} from 'react-router'

const routerConfig = [{
  path: '/',
  indexRoute: {
    getComponent(nextState, cb) {
      require.ensure([], (require) => {
        cb(null, require('./containers/Home'))
      }, 'Home')
    },
  },
  getComponent(nextState, cb) {
    require.ensure([], (require) => {
      cb(null, require('./containers/App'))
    }, 'App')
  },
  childRoutes: [
    require('./routes/home'),
    require('./routes/anime'),
    require('./routes/game')
  ]
}, {
    path: '*',
    component: require('./components/404')
}]

export default routerConfig
